# coding = utf-8

from rest_framework import serializers
from rest_framework.serializers import ModelSerializer

from document.models import LoanNote


class LoanNoteSerializer(ModelSerializer):
    """
    借条
    """
    cate_name = serializers.CharField(source="get_cate_display", read_only=True)
    user_name = serializers.CharField(source="user.real_name", read_only=True)

    class Meta:
        model = LoanNote
        exclude = ["update_time", "add_time"]




